Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BWC issues for x_pack/usage #55181

Merged
merged 10 commits into from
Apr 16, 2020

Conversation

imotov
Copy link
Contributor

@imotov imotov commented Apr 14, 2020

Fixes several BWC issues in x_pack/usage discovered after introduction of the
bwc test.

Relates to #54847

@jtibshirani and @martijnvg adding you to reviewers since I had to add enrich and some parts for flatten back.

Even though master no longer reports flatten as a feature we still can receive it from 7.x nodes during upgrade. I wasn't sure if I should add these piece back or just hard code flatten in the reader, read a string, two booleans and an int and be done with it. Please, let me know what you think.

Fixes several BWC issues in x_pack/usage discovered after introduction of the
bwc test.

Relates to elastic#54847
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (:Analytics/Aggregations)

@imotov imotov marked this pull request as draft April 14, 2020 22:25
@imotov
Copy link
Contributor Author

imotov commented Apr 14, 2020

Looks like there are still broken piece we serialize back to 7.x. I will continue digging.

@imotov
Copy link
Contributor Author

imotov commented Apr 15, 2020

@elasticmachine update branch

@jtibshirani
Copy link
Contributor

Thanks @imotov for handling this and sorry that you ran into it. To me the approach seems okay -- I find it cleanest to just re-introduce the classes as you've done here. As a small note, perhaps we could mark the classes @Deprecated and add a note to remove them in 9.0.

In the PR where I naively removed flattened from the usage API, I also removed it from the info API (#53076). So I think the same BWC issue applies to info as well. We could fix it in this PR, or I'm also happy to do it in a follow-up.

@imotov
Copy link
Contributor Author

imotov commented Apr 16, 2020

As a small note, perhaps we could mark the classes @deprecated and add a note to remove them in 9.0.

Yes! Marked them as deprecated. I wonder if we should add a test that would fail if the version is 9.0 and Flattened is still there.

So I think the same BWC issue applies to info as well.

I checked info and it looks like it's all local. The only thing that goes over the wire are sting maps of strings and boolean. So, I think we should be fine. But I have added a test for it just in case I missed something there.

@imotov imotov marked this pull request as ready for review April 16, 2020 12:40
Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The enrich part looks good. Thanks for fixing @imotov.

Copy link
Contributor

@jtibshirani jtibshirani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me too.

Copy link
Contributor

@polyfractal polyfractal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM3! Thanks again for tackling all of this usage stuff :)

@imotov imotov merged commit 89446a7 into elastic:master Apr 16, 2020
tlrx added a commit to tlrx/elasticsearch that referenced this pull request Apr 17, 2020
tlrx added a commit that referenced this pull request Apr 17, 2020
@imotov imotov deleted the fix-bwc-issues-in-xpack-usage branch May 1, 2020 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants